import 'package:love_newf/app/com/model/room_data_model.dart';
import 'package:love_newf/generated/json/base/json_field.dart';
import 'package:love_newf/generated/json/room_info_model.g.dart';
import 'dart:convert';
export 'package:love_newf/generated/json/room_info_model.g.dart';

@JsonSerializable()
///直播间基本信息
class RoomInfoModel {
	int id = 0;
	int userId = 0;
	int selfUserId = 0; //手动添加的，不是后端返回的。
	String name = '';
	String firstMsg = '';
	int roomType = 0;
	String roomCover = '';
	String createTime = '';
	String endTime = '';
	int accumulatePeople = 0;
	int receiveTokens = 0;
	int autoShangMai = 0;
	int hideRoom = 0;
	int coverUserId = 0;
	int onlineCount = 0;
	int deleteFlag = 0;
	int musicPropId = 0;
	int musicJumpTokens = 0;
	int minutes = 0;
	int changed = 0;
	RoomInfoUserRoomVO? userRoomVO;
	List<RoomDataRoomMais> roomMais = [];
	int addHostUserFans = 0;
	int tokens = 0;
	int toppingMaiIndex = 0;
	int autoClose = 0;
	int autoCloseInterval = 0;

	RoomInfoModel();

	factory RoomInfoModel.fromJson(Map<String, dynamic> json) => $RoomInfoModelFromJson(json);

	Map<String, dynamic> toJson() => $RoomInfoModelToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class RoomInfoUserRoomVO {
	int userId = 0;
	String userCode = '';
	String avatar = '';
	String nick = '';
	int sex = 0;
	int age = 0;
	String avatarFrameUrl = '';
	int vipGrade = 0;
	List<RoomInfoUserRoomVOUserLabels> userLabels = [];
	int prohibition = 0;
	String beautifulCodeUrl = '';
	String chatFrameUrl = '';

	RoomInfoUserRoomVO();

	factory RoomInfoUserRoomVO.fromJson(Map<String, dynamic> json) => $RoomInfoUserRoomVOFromJson(json);

	Map<String, dynamic> toJson() => $RoomInfoUserRoomVOToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class RoomInfoUserRoomVOUserLabels {
	int anchorUserId = 0;
	String labelName = '';
	int labelType = 0;
	String url = '';

	RoomInfoUserRoomVOUserLabels();

	factory RoomInfoUserRoomVOUserLabels.fromJson(Map<String, dynamic> json) => $RoomInfoUserRoomVOUserLabelsFromJson(json);

	Map<String, dynamic> toJson() => $RoomInfoUserRoomVOUserLabelsToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class RoomInfoRoomMaisRoomAnchorStickersList {
	int propId = 0;
	int count = 0;
	String lastTime = '';

	RoomInfoRoomMaisRoomAnchorStickersList();

	factory RoomInfoRoomMaisRoomAnchorStickersList.fromJson(Map<String, dynamic> json) => $RoomInfoRoomMaisRoomAnchorStickersListFromJson(json);

	Map<String, dynamic> toJson() => $RoomInfoRoomMaisRoomAnchorStickersListToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class RoomInfoRoomMaisMusicVO {
	int userId = 0;
	String nick = '';
	String avatar = '';
	int pointUserId = 0;
	String pointNick = '';
	String pointAvatar = '';
	String musicSerialNumber = '';
	int musicStatus = 0;
	String musicName = '';
	String createTime = '';

	RoomInfoRoomMaisMusicVO();

	factory RoomInfoRoomMaisMusicVO.fromJson(Map<String, dynamic> json) => $RoomInfoRoomMaisMusicVOFromJson(json);

	Map<String, dynamic> toJson() => $RoomInfoRoomMaisMusicVOToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}